package routes

import (
	"gitee.com/kouleen/job-admin/internal/handlers"
	"gitee.com/kouleen/job-admin/internal/repositories"
	"gitee.com/kouleen/job-admin/internal/services"
	"github.com/gorilla/mux"
)

func SetUpPluginServerRoutes(authRouter *mux.Router) {
	pluginServerRepo := repositories.NewPluginServerRepository()
	pluginServerService := services.NewPluginServerService(pluginServerRepo)
	pluginServerHandle := handlers.NewPluginServerHandle(pluginServerService)

	// 心跳检测
	authRouter.HandleFunc("/v1/plugin/server/heart/{serverCode}",pluginServerHandle.HeartPluginServer).Methods("GET","POST")
	// 服务注册
	authRouter.HandleFunc("/v1/plugin/server/register",pluginServerHandle.RegisterPluginServer).Methods("POST")
}